window.onload = function(){
  if('serviceWorker' in navigator){
    navigator.serviceWorker.register('/sw.js',{scope:'/'}).then( registeration => {
      console.log('ServiceWorker register success with scope:',registeration.scope)
    })
  }
}